const fs = require('fs')
const path = require('path')
const map = new Map()

fs.readdir(__dirname, (err, files) => {
    if (err) {
        console.error("Error reading directory:", err)
        return
    }
    files.forEach(file => {
        if (file !== 'index.js' && path.extname(file) === '.js') {
            const { verify, result } = require(path.resolve(__dirname, file))
            map.set(verify, result)
        }
    })
})

module.exports = map